<?php

class media extends Model {

	public $media_id = false;
public $folder_id = false;
public $media_subfolder = false;
public $user_id = false;
public $media_epoch = false;
public $media_title = false;
public $extension_id = false;
public $media_desc = false;
public $media_size = false;



    function media()
    {
        // Call the Model constructor
        parent::Model();
		$this->_table_name = 'media';
		$this->_primary_key = 'media_id';
    }
	
	public function update_null_folders($iFolderId)
	{
		$aClassVars = get_class_vars(get_class($this));
		
		foreach ($aClassVars as $vVar => $vVal)
		{
			if (in_array($vVar, $this->_ignore_vars) === false)
			{
				if ($this->$vVar !== false)
				{
					$this->db->where($vVar, $this->$vVar);
						
				}
			}
		}
		
		$this->db->update('media', array('folder_id' => $iFolderId));
		

	}
	

}

?>